sdl2-unifont
Sometimes, you just need to draw some text in your SDL application, and don't need any kind of advanced rendering features. You don't want the hassle of distributing a separate font file, relying on system fonts which often vary in location, or having to use SDL_ttf, just to display a few lines of text.
This library embeds the GNU Unifont, xzipped, inside the application binary, and decompresses it automatically before use. The library tries somewhat to minimise both it's on-disk and in-memory size.
Getting Started
Check here for the latest version of
sdl2-unifont
.
Or add the following to your Cargo.toml
:
[]
= "1.0.2"
Demo
Run the included example, with cargo run --example demo --features plane-1
to
produce the above screen.
Example
extern crate sdl2_unifont;
use SurfaceRenderer;
use Color;
Consult examples/demo.rs
for additional example code.